<?php
  try {  	

  $G_MAIN_MENU = 'processmaker';
  $G_SUB_MENU = '';
  $G_ID_MENU_SELECTED = 'ID_HR_EMP';
  $G_ID_SUB_MENU_SELECTED = '';

  $G_PUBLISH = new Publisher;

  require_once ( PATH_PLUGINS . 'hr' . PATH_SEP . 'class.hr.php');
  $pluginObj = new hrClass ();

  require_once ( "classes/model/HrEmployee.php" );

  $Criteria = new Criteria('workflow');
  $Criteria->clearSelectColumns ( );
  
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEE_UID );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEFIRSTNAME );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEMIDDLENAME );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEELASTNAME );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEECALLEDNAME );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEWORKEMAIL );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEPERSONALEMAIL );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEHOMEPHONE );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEMOBILEPHONE );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEWEBPAGE );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEGENDER_ID );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEDATEOFBIRTH );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEESTATE_ID );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEESSN );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEPICTURE );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISHISPANIC );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISASIAN );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISAFRICANAMERICAN );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISAMERICANINDIAN );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISALASKANATIVE );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISHAWAIIANOROTHERPACIFICISLANDER );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEEISWHITE );
  $Criteria->addSelectColumn (  HrEmployeePeer::DISTRICT_ID );
  $Criteria->addSelectColumn (  HrEmployeePeer::DISTRICTPHONE );
  $Criteria->addSelectColumn (  HrEmployeePeer::DISTRICTEXTENSION );
  $Criteria->addSelectColumn (  HrEmployeePeer::HOMEPHONEUNLISTED );
  $Criteria->addSelectColumn (  HrEmployeePeer::MARITALSTATUS_ID );
  $Criteria->addSelectColumn (  HrEmployeePeer::SUBDAYS );
  $Criteria->addSelectColumn (  HrEmployeePeer::OSDIDISTRICTCODE );
  $Criteria->addSelectColumn (  HrEmployeePeer::DIRECTDEPOST );
  $Criteria->addSelectColumn (  HrEmployeePeer::RETIREMENTELIGIBLE );
  $Criteria->addSelectColumn (  HrEmployeePeer::HANDICAPSTATUS );
  $Criteria->addSelectColumn (  HrEmployeePeer::MULTILINGUAL );
  $Criteria->addSelectColumn (  HrEmployeePeer::REPORTTOEMIS );
  $Criteria->addSelectColumn (  HrEmployeePeer::ODHSREPORTED );
//  $Criteria->addSelectColumn (  HrEmployeePeer::EMPLOYEETYPE_ID );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMISEMPLOYEEID );
  $Criteria->addSelectColumn (  HrEmployeePeer::EMAILDIRECTDEPOST );
  $Criteria->addSelectColumn (  HrEmployeePeer::USER_ID );

  $Criteria->add (  hrEmployeePeer::EMPLOYEE_UID, "xx" , CRITERIA::NOT_EQUAL );
  
  $G_PUBLISH->AddContent('propeltable', 'paged-table', 'hr/hrEmployeeList', $Criteria , array(),'', '../../gulliver/propelTableAjax');
  G::RenderPage('publish', 'blank');

  }
  catch ( Exception $e ) {
    $G_PUBLISH = new Publisher;
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
    G::RenderPage( 'publish', 'blank' );
  }      
